
package com.sausageking.client.mvp;

import com.google.gwt.place.shared.Place;

public abstract class ActivityPlace<T extends BaseActivity> extends Place {

  protected T activity;

  protected String placeName;

  public ActivityPlace(T activity) {
    this.activity = activity;
    activity.setPlace(this);
  }

  public T getActivity() {
    return activity;
  }

  public void setToken(String token) {
    String parts[] = token.split("&"); // Facebook dialog add &post_id=999 after
                                       // hashtag if dialog post is successful
    token = parts[0];
    activity.setToken(token);
  }

  public String getToken() {
    return activity.getToken();
  }

  abstract public String getPlaceName();
}
